<div id="top">
  <a href="<?php echo Yii::app()->createUrl('dadmin'); ?>" 
     class="logo" 
     title="<?php echo Yii::t('app', 'WebTitle'); ?>"></a>

  <?php if (Yii::app()->user->getState('is_admin')): ?>
  <div class="welcome">
    <span class="note">Welcome, <?php
      $url = Yii::app()->createUrl('dadmin/users/changePasswd');
      echo CHtml::link(Yii::app()->user->username, $url, array(
        'title' => 'Click here to change password',
      ));
    ?></span>
    <a class="btn ui-state-default ui-corner-all" href="<?php
      echo Yii::app()->createUrl('logout');
    ?>">
      <span class="ui-icon ui-icon-power"></span>
      Logout
    </a>						
  </div>
  <?php endif;?>
</div>